﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Common
{
    public class ActsMechan
    {
        public int ID { get; set; }
        //Название акта к которой относится запись
        public string Record { get; set; }
        //Автомобіль
        public string Avtomobile { get; set; }
        //Трудовитрати на одиницю
        public decimal ManHoursUnit { get; set; }
        //Водій
        public string Driver { get; set; }
        //Трудовиторати на обсяг робіт
        public decimal LaborCostsEmp { get; set; }

        public Dictionary<string, string> ResourcseFields { get; private set; }
        public Dictionary<string, string> ActsMechanFields { get; private set; }
        public Dictionary<string, string> RecordFields { get; private set; }
        public Dictionary<string, string> EmployeeFields { get; private set; }

       public ActsMechan() { }
       public ActsMechan(string record, string avtomobile, decimal manHoursUnit, string driver, decimal laborCostEmp)
            :this(0, record, avtomobile, manHoursUnit, driver, laborCostEmp) { }
       public ActsMechan(int id, string record, string avtomobile, decimal manHoursUnit, string driver, decimal laborCostEmp)
        {
            this.ID = id;
            this.Record = record;
            this.Avtomobile = avtomobile;
            this.ManHoursUnit = manHoursUnit;
            this.Driver = driver;
            this.LaborCostsEmp = laborCostEmp;

            ResourcseFields = new Dictionary<string, string>(1);
            ResourcseFields.Add("Avtomobile", Avtomobile);

            //ActsMechanFields = new Dictionary<string, string>(1);
            //ActsMechanFields.Add("ManHoursUnit", ManHoursUnit);
            //ActsMechanFields.Add("LaborCostsEmp", LaborCostsEmp);

            RecordFields = new Dictionary<string,string>(1);
            RecordFields.Add("Record", Record);

            EmployeeFields = new Dictionary<string, string>(1);
            EmployeeFields.Add("Driver", Driver);
        }
    }
}
